<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                template="layout/template.xhtml">
                       
<ui:define name="body">
    
    <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
    
    <rich:panel>
        <f:facet name="header">#{messages['application.gradehoraria.label']}</f:facet>

        <s:decorate id="indDiaSemana" template="layout/display.xhtml">
            <ui:define name="label">#{messages['application.campus.label']}</ui:define>
            #{gradeHorariaHome.instance.turma.gradeCurricular.curso.campus.desCampus}
        </s:decorate>

        <s:decorate id="numHoraInicio" template="layout/display.xhtml">
            <ui:define name="label">#{messages['application.curso.label']}</ui:define>
            #{gradeHorariaHome.instance.turma.gradeCurricular.curso.nomCurso}
        </s:decorate>

        <s:decorate id="numHoraFim" template="layout/display.xhtml">
            <ui:define name="label">#{messages['application.turma.label']}</ui:define>
            #{gradeHorariaHome.instance.turma.codTurma}
        </s:decorate>

        <div style="clear:both"/>
        
    </rich:panel>
    
    <div class="actionButtons">      

        <s:button view="/GradeHorariaDnDEdit.xhtml" action="#{gradeHorariaHome.prepareEdit}" 
                    id="edit" 
                 value="#{messages['application.label.edit']}"/>

        <s:button view="/#{empty gradeHorariaFrom ? 'GradeHorariaList' : gradeHorariaFrom}.xhtml"
                    id="done"
                 value="#{messages['application.label.cancel']}"/>

    </div>

    <rich:dataTable id="gradeHoraria" value="#{gradeList}" var="helper" rowKeyVar="row">
       	<h:column>
       		<f:facet name="header">
       			#{messages['application.gradehoraria.horario.label']}
       		</f:facet>
       		<h:outputText value="${helper.horaInicio}-${helper.horaFim}" />
       	</h:column>
       	<h:column>
       		<f:facet name="header">
       			#{messages['application.gradehoraria.segunda.label']}
       		</f:facet>
       		<rich:panel style="width:170px" >
       			<h:outputText value="${helper.gradeSegunda.disciplina.nomDisciplina}" />
       		</rich:panel>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeSegunda.professor.nomProfessor}" />
       		</rich:panel>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeSegunda.localizacao.desLocalizacao}" />
       		</rich:panel>
       	</h:column>
       	<h:column>
       		<f:facet name="header">
       			#{messages['application.gradehoraria.terca.label']}
       		</f:facet>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeTerca.disciplina.nomDisciplina}" />
       		</rich:panel>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeTerca.professor.nomProfessor}" />
       		</rich:panel>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeTerca.localizacao.desLocalizacao}" />
       		</rich:panel>
       	</h:column>
       	<h:column>
       		<f:facet name="header">
       			#{messages['application.gradehoraria.quarta.label']}
       		</f:facet>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeQuarta.disciplina.nomDisciplina}" />
       		</rich:panel>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeQuarta.professor.nomProfessor}" />
       		</rich:panel>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeQuarta.localizacao.desLocalizacao}" />
       		</rich:panel>
       	</h:column>
       	<h:column>
       		<f:facet name="header">
       			#{messages['application.gradehoraria.quinta.label']}
       		</f:facet>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeQuinta.disciplina.nomDisciplina}" />
       		</rich:panel>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeQuinta.professor.nomProfessor}" />
       		</rich:panel>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeQuinta.localizacao.desLocalizacao}" />
       		</rich:panel>
       	</h:column>
       	<h:column>
       		<f:facet name="header">
       			#{messages['application.gradehoraria.sexta.label']}
       		</f:facet>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeSexta.disciplina.nomDisciplina}" />
       		</rich:panel>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeSexta.professor.nomProfessor}" />
       		</rich:panel>
       		<rich:panel style="width:170px">
       			<h:outputText value="${helper.gradeSexta.localizacao.desLocalizacao}" />
       		</rich:panel>
       	</h:column>
	</rich:dataTable>
</ui:define>

</ui:composition>
